home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Technology Demos and Tools.iso / solidifier / doc / lava.doc < prev   
Text File  |  1995-12-06  |  52KB  |  1,609 lines

  1.                         26-July-1995
  2.  
  3.         LAVA documentation (V1.0)
  4.  
  5.  
  6.  
  7. INTRODUCTION
  8.  
  9. LAVA is a program for manipulating 3D objects.  Its original purpose
  10. was to test the XGL Application Programmer Interface (API) to help
  11. debug new hardware.  It has grown to be a good way to demonstrate 3D
  12. graphics.  Eventually it will become a tool for modifying 3D models.
  13.  
  14. The original program was conceived by Scott R. Nelson of Sun
  15. Microsystems and an initial version was implemented by John Lilly, a
  16. Stanford University student, who worked as a summer intern for Sun in
  17. 1992.  Enhancements were made by Scott R. Nelson with some of the NURBs
  18. code by Ranjit Oberoi and a few other odds and ends by Bob Schumacker.
  19. The program is still far from complete.
  20.  
  21. The tool was later enhanced and redesigned by Yakov Kamen,
  22. Alex Metzler, Leon Shirman and Kirk Brown when it was renamed LAVA
  23. because of its new features and applications.
  24.  
  25. For additional information about specific attributes beyond the simple
  26. descriptions found here, refer to the XGL 3.0 Programmer's Guide or
  27. Reference Manual.
  28.  
  29.  
  30.  
  31. STARTING LAVA
  32.  
  33. Because LAVA is written in XGL, it will run on any Sun workstation
  34. with a color display.  However, it only runs efficiently on 3D graphics
  35. accelerators.  It is still useful for looking at simple models on 8-bit
  36. displays, but the lack of double-buffering makes rendering of solids
  37. using motion quite slow.  Eventually the code will be updated to detect
  38. 8-bit systems and to use indexed mode with wireframe as the default
  39. object display form.  It runs well in wireframe mode on the TGX.
  40.  
  41. LAVA may be started by typing the program name (lava).  When
  42. started with no command line options, it starts up with a 500 by 500
  43. window displaying a colored cube on a black background.
  44.  
  45. LAVA has the following command line options:
  46.  
  47.     -single
  48.  
  49.     Start up in single-buffered mode instead of the default
  50.     double-buffered mode.  Use this for 8-bit displays.
  51.  
  52.     -file
  53.  
  54.     Specify the file to be loaded.  This may have any of the
  55.     following extensions:
  56.  
  57.         .obj    Wavefront format
  58.         .off    DEC Object File Format
  59.         .shad    Sun Shader format (ancient)
  60.         .mdl    LAVA model script
  61.  
  62. For controlled demos, start up the program using any name other than
  63. "lava" and it will come up using a full screen window using the
  64. name "3DOM", pronounced "threedom", which stands for Three-
  65. Dimensional Object Manipulator.  This version is safe for any nieve
  66. user if given proper .mdl files.
  67.  
  68.  
  69.  
  70. MOTION
  71.  
  72. Objects may be moved in several different ways.  On systems with
  73. control dials, the object can be moved using the dials.  The dials are
  74. assigned as follows:
  75.  
  76.     dial 0    Rotate about the X axis
  77.     dial 1    Rotate about the Y axis
  78.     dial 2    Rotate about the Z axis
  79.     dial 3    Scale the object
  80.     dial 4    Translate along the X axis
  81.     dial 5    Translate along the Y axis
  82.     dial 6    Translate along the Z axis
  83.     dial 7    Does nothing.
  84.  
  85. The object may also be moved using the mouse.  With the cursor in the
  86. graphics window, press the "select" mouse button (usually the left
  87. button) and the object can be rotated about the X and Y axes by moving
  88. the mouse.  Press the "adjust" mouse button (usually the middle button)
  89. and the object may be scaled when the mouse is moved up and down.
  90. There is currently no way to translate using the mouse.  Note that
  91. mouse motion is disabled when picking is enabled.  In the current
  92. version (V2.0), if the mouse is moving when you let go of the object,
  93. it will keep moving in that direction.  To stop the motion, either
  94. hold the object still for a while or just click once, quickly in the
  95. window.
  96.  
  97. The object may also be rotated using the controls in the motion menu.
  98. These controls allow the object to be rotated either a specified number
  99. of frames or continually using the "free run" button.  More will be
  100. said about these controls in the controls section below.
  101.  
  102. Raster images may also be moved by the mouse.  In this case,
  103. pressing any mouse button effectively attaches the image to the
  104. cursor as it is moved.  Releasing the mouse button leaves the image
  105. at its current position.
  106.  
  107.  
  108.  
  109. MENU BUTTONS
  110.  
  111. There are 4 menu buttons across the top of the frame and one text
  112. field in the footer.  The buttons are as follows:
  113.  
  114.     Controls
  115.  
  116.     Puts up a menu with 5 buttons, three of which bring up
  117.     submenus.  Each final menu button brings up a control panel
  118.     with controls over various attributes and settings.  There
  119.     are 20 total control panels available.
  120.  
  121.     File
  122.  
  123.     Allows new objects and models to be loaded.  Also allows
  124.     objects and model parameters to be saved.
  125.  
  126.     Props
  127.  
  128.     Contains the performance panel, an incomplete edit menu, a
  129.     short help document and an About panel listing the authors.
  130.  
  131.     Quit
  132.  
  133.     A simple way to exit the tool.
  134.  
  135. The text field at the left of the footer displays the current object
  136. name.
  137.  
  138.  
  139.  
  140. THE CONTROLS MENU
  141.  
  142. The Controls menu allows the user to modify the attributes of the
  143. object being displayed.  Each control panel contains buttons,
  144. sliders and/or text fields that allow attribute values to be set.
  145.  
  146. Most of the controls that offer choices change the default so that
  147. clicking on the button cycles through the choices.  This is done
  148. as a convenience for the user.  Certain choices stay with one
  149. default if the other values might have undesirable consequences
  150. (for example, Raster OP).  Use the menu button to select a specific
  151. setting.
  152.  
  153. The controls menu contains the following 5 menu buttons:
  154.     Part Selection
  155.     Per Part Attributes
  156.     Other Attributes
  157.     Settings & COntrols
  158.     Demo
  159.  
  160. The Per Part Attributes pull right menu contains the following 7
  161. menu buttons:
  162.  
  163.     Render Options
  164.     Markers
  165.     Lines
  166.     Front Surface
  167.     Back Surface
  168.     Edges
  169.     NURBS
  170.  
  171. The Other Attributes pull right menu contains the following 6 menu
  172. buttons:
  173.  
  174.     Picking
  175.     Lighting
  176.     Depth Cue
  177.     Texture Mapping
  178.     Model Clipping
  179.     Annotation
  180.     Text
  181.  
  182. The Settings & Controls pull right menu contains the following 5
  183. menu buttons:
  184.  
  185.     Global Settings
  186.     Motion
  187.     View
  188.     Environment
  189.     Raster
  190.  
  191.  
  192. The 20 control panels are defined as follows:
  193.  
  194.  
  195. Part Selection
  196.  
  197.     This menu allows you to specify which parts are displayed and
  198.     which part is the current part.
  199.  
  200.     Select All
  201.     This button selects all parts to be displayed.
  202.  
  203.     Deselect All
  204.     This button deselects all parts so that none of them are
  205.     displayed.  It is assumed the user will then select one
  206.     part to be displayed.
  207.  
  208.     Current Part:
  209.     Specifies which is the current part, to which any
  210.     part-specific attribute settings will apply.
  211.  
  212.     Object Parts:
  213.     This scrolling list contains the names of all parts in the
  214.     model.  The first item is always "Global", which draws
  215.     nothing, but affects attributes for all parts.  Any
  216.     attribute for a specific part that has been set by the user
  217.     or by a model command file will not be affected by global
  218.     attribute changes.  Clicking on a highlighted name turns off
  219.     the part.  Clicking on an unhighlighted name turns on the
  220.     part and selects it as the current part.  To make a
  221.     displayed part the current part requires a double click.
  222.     Holding the select button down while moving up and down
  223.     selects or deselects whichever names are touched.
  224.  
  225.     Note that Select All and Deselect All both cause the current
  226.     part to be "Global".
  227.  
  228.  
  229. Render Options
  230.  
  231.     This menu is for setting rendering attributes.  It may apply
  232.     for either the entire object (Global) or per part.
  233.  
  234.     Primitive Type:
  235.     You may display the object or part as a solid, wireframe, or as
  236.     markers at the vertices.  Default is Solid.
  237.  
  238.     Face Culling:
  239.     Face culling off means that both front and back faces will be
  240.     rendered.  Turning culling to Front means that XGL will only
  241.     draw back faces, and vice versa.  Default is Off.
  242.  
  243.     Face Dist(inguishing):
  244.     When this is off, properties for both front and back surfaces
  245.     are taken from the Front Surface Properties menu.  Turning it
  246.     on causes the Back Surface Menu to become selectable.  Default
  247.     is Off.
  248.  
  249.     Raster OP:
  250.     Allows you to choose which raster operation is performed.  Most
  251.     settings don't make sense while rendering.  Default is Copy.
  252.  
  253.     HLHSR Mode:
  254.     This allows you to turn Hidden Line and Hidden Surface Removal
  255.     on and off.  Default is on.
  256.  
  257.  
  258. Markers
  259.  
  260.     This menu is used to set marker properties when the object or part
  261.     is being displayed in MARKER mode.  It may apply for either the
  262.     entire object (Global) or per part.
  263.  
  264.     Marker Type:
  265.     Allows the user to specify which XGL pre-defined marker is
  266.     used to represent each point.  Choices are:  Dot, Plus,
  267.     Asterisk, Circle, Cross, Square, Bowtie NE (goes Northeast
  268.     to Southwest), or Bowtie NW (Northwest to Southeast).
  269.     Default is Dot.
  270.  
  271.     Marker Color:
  272.     Used to set the marker color, if the Color Selector switch
  273.     is set to Context.  There must be three floats on this line
  274.     to be recognized.  Default is green.  (0.0 1.0 0.0)
  275.  
  276.     Antialiasing:
  277.     For no antialiasing (jaggy lines or dots) turn this off.  For
  278.     markers all by themselves, the best setting is to blend to
  279.     constant background.  For markers and lines mixed with solids,
  280.     the best setting is to blend to arbitrary background.  Default
  281.     is OFF.
  282.  
  283.     Scale Factor:
  284.     This determines the size of each marker.  It doesn't do
  285.     anything to the Dot marker.  Default is 10.0.
  286.  
  287.     Color Selector:
  288.     Context means that markers should be the same color as their
  289.     part color.  If vertex colors were implemented, then selecting
  290.     the Point option would mean that the markers would be the same
  291.     color as their vertex is specified to be.  Default is Context.
  292.  
  293.  
  294. Lines
  295.  
  296.     This menu may be used to set line properties when the object or
  297.     part is being displayed in WIREFRAME mode.  It may apply for
  298.     either the entire object (Global) or per part.
  299.  
  300.     Line Color:
  301.     Putting exactly three floats on this line allows you to set
  302.     the line color.  Default is green.  (0.0 1.0 0.0)
  303.  
  304.     Antialiasing:
  305.     For no antialiasing (jaggy lines) turn this off.  For lines
  306.     all by themselves, the best setting is to blend to constant
  307.     background.  For lines mixed with solids, the best setting is
  308.     to blend to arbitrary background.  Default is OFF.
  309.  
  310.     Line Width:
  311.     Allows the user to determine how many pixels wide (or fraction
  312.     thereof) that lines are drawn.  For lines greater than 1.0, the
  313.     Endpoint Style and Join Style options become active.  Expect
  314.     lines wider than 1 to be significantly slower than single pixel
  315.     lines.  Default is 1.0.
  316.  
  317.     Endpoint Style:
  318.     Select which of three styles are used for endpoints on wide
  319.     lines:  Butt, Square, or Round.  Default is Butt.
  320.  
  321.     Join Style:
  322.     Determines how lines are joined: Device Specific, Beveled,
  323.     or Mitered.  Default is Mitered.
  324.  
  325.     Miter Limit:
  326.     When the Join Style setting is set to Mitered, this determines
  327.     the miter limit.  Default is 2.0.
  328.  
  329.     Line Style:
  330.     Solid means that lines will be drawn only in the color
  331.     specified by the Line Color field.  Patterned will draw the
  332.     lines in the color specified by the Line Color field and the
  333.     pattern chosen by the Line Pattern selection.  Alt Patterned
  334.     will render the lines in a pattern specified by the Line
  335.     Pattern selection and alternating between the colors Line
  336.     Color and Alt Line Color.  Default is Solid.
  337.  
  338.     Line Pattern:
  339.     Described above in the Line Style entry, this may take on
  340.     the values of Dotted, Dashed, Dashed-Dotted, Cgm Dotted,
  341.     Cgm Dashed, Dash-Dot, Dash-Dot-Dotted, or Long Dashed.
  342.     Default is Dotted.
  343.  
  344.     Alt Line Color:
  345.     Also described above, this field must have exactly three
  346.     floating-point numbers.  The default is white.  (1.0 1.0 1.0)
  347.  
  348.     Color Selector:
  349.     This specifies whether line colors are determined by their
  350.     part colors or by their vertex colors.  Vertex colors are not
  351.     currently supported, so this doesn't affect anything.  Default
  352.     is Context.
  353.  
  354.     Color Interpolation:
  355.     This won't be a useful choice until vertex colors are
  356.     implemented.  Default is OFF.
  357.  
  358.  
  359. Front Surface
  360.  
  361.     This menu allows you to set surface properties for your object
  362.     or part.  It may apply for either the entire object (Global)
  363.     or per part.  Back properties only apply when face
  364.     distinguishing is enabled in the render menu.
  365.  
  366.     Surface color:
  367.     Specifies the color of the surface.  Enter three floats
  368.     on this line to specify a valid color.  Default is white.
  369.     (1.0 1.0 1.0)
  370.  
  371.     Fill Style:
  372.     This determines how solids are drawn.  All but solid are
  373.     likely to be slower on most machines.
  374.  
  375.     Solid means that the object is drawn filled with its color.
  376.  
  377.     Hollow draws only the edges of each polygon,
  378.  
  379.     Empty draws nothing (unless edges are enabled).
  380.  
  381.     Stipple and Opaque Stipple render the object with patterns
  382.     determined by the Stipple Pattern setting.  Both Stipple
  383.     fill styles will cause a severe degradation in performance,
  384.     however.
  385.  
  386.     Default is Solid.
  387.  
  388.     Stipple Pattern:
  389.     As mentioned above, this setting determines what pattern is
  390.     used when the Fill Style is Stipple or Opaque Stipple.
  391.     Default is a horizontal pattern.
  392.  
  393.     Color Selector:
  394.     Default is Illumination Independent.
  395.  
  396.     Illum(ination):
  397.     This specifies the illumination model:
  398.  
  399.     None means no illumination at all.
  400.  
  401.     Interp Color works exactly the same as None, since we don't
  402.     have vertex colors.
  403.  
  404.     Per Facet causes the model to be rendered with flat shading,
  405.     and Per Vertex will turn on Gouraud Shading.
  406.  
  407.     Default is Per Facet.
  408.  
  409.     Light Component:
  410.     Specifies which of the three light components: ambient,
  411.     diffuse or specular, are used in lighting.  Each of the
  412.     three may be turned on and off independently.  The
  413.     Default is all on.
  414.  
  415.     Ambient, Diffuse, Specular:
  416.     These sliders determine the ambient, diffuse, and specular
  417.     coefficients, respectively.
  418.     Defaults:
  419.         Ambient:     0.2
  420.         Diffuse:     0.8
  421.         Specular:    1.0
  422.  
  423.     Specular Color:
  424.     Specifies the color of the specular highlight.  Enter
  425.     three floats on this line to specify a valid specular
  426.     highlight color.  Default is white. (1.0 1.0 1.0)
  427.  
  428.     Specular Power:
  429.     Specifies the specular power used in computing the
  430.     specular highlight.  Big number cause small specular
  431.     highlights and small numbers cause big specular
  432.     highlights.  This number is used exponentially, so
  433.     expect the greatest changes between about 5.0 and 30.0.
  434.     Default is 20.0
  435.  
  436.     Transp Method:
  437.     This specifies the transparency method used.
  438.     "None" means no transparency. (default)
  439.     "Screen Door" uses screen door transparency.
  440.     "Blended" uses blended transparency.
  441.  
  442.     Transp. Blend Eq:
  443.     If the transparency method is "blended", this
  444.     specifies which blend equation to use.
  445.     "None" does no blending. (default)
  446.     "Constant BG" blends to a constant background.
  447.     "Arbitrary BG" blends to an arbitrary background (best).
  448.     "Add to BG" adds to the current background.
  449.  
  450.     Transparency:
  451.     This slider determines the transparency.
  452.     A value of 0.0 is fully opaque and a
  453.     value of 1.0 is fully transparent.
  454.  
  455.  
  456. Back Surface
  457.  
  458.     This is identical to Front Surface, but for back surface
  459.     properties.  Transparency method and blend equation are not
  460.     specified for back surfaces (the front settings are used).
  461.  
  462.  
  463. Edges
  464.  
  465.     When the model is rendered as a solid, you may turn edges on
  466.     (display edges of each polygon) and set their attributes in
  467.     this menu.  It may apply for either the entire object
  468.     (Global) or per part.
  469.  
  470.     Show Edges:
  471.     OFF => Do not render polygon edges, XGL => Render edges
  472.     using XGL to draw the edges, Software => Render edges using
  473.     LAVA wireframe to draw the edges.  Default is OFF.
  474.  
  475.     Edge Color:
  476.     Specifies the color of the edges.  This line must have EXACTLY
  477.     three floating-point numbers on it (R, G, B) to set the edge
  478.     color.  Default is black.  (0.0 0.0 0.0)
  479.  
  480.     Antialiasing:
  481.     For no antialiasing (jaggy lines) turn this off.  For lines all
  482.     by themselves, the best setting is to blend to constant
  483.     background.  For lines mixed with solids, the best setting is
  484.     to blend to arbitrary background.
  485.  
  486.     Default is OFF.
  487.  
  488.     Edge Width:
  489.     Allows the user to determine how many pixels (or fraction
  490.     thereof) in width that edges are drawn.  Default is 1.0.
  491.  
  492.     Edge Style:
  493.     Solid => Edges are drawn the color that is specified by the
  494.     Edge Color field.
  495.  
  496.     Patterned => Edges are drawn with the color specified in the
  497.     Edge Color field and the pattern specified by the Edge Pattern
  498.     selection.
  499.  
  500.     Alt Patterned => Edges are drawn in the pattern specified by
  501.     the Edge Pattern selection, but alternates colors between
  502.     Edge Color and Alt. Edge Color.
  503.  
  504.     Both Patterned and Alt Patterned choices will cause a
  505.     degradation in performance.
  506.  
  507.     Default is Solid.
  508.  
  509.     Edge Pattern:
  510.     Described above, this can take the values of Dotted, Dashed,
  511.     Dashed-Dotted, Cgm Dotted, Cgm Dashed, Dash-Dot,
  512.     Dash-Dot-Dotted, or Long Dashed.  Default is Dotted.
  513.  
  514.     Alt Edge Color:
  515.     Described above, there must be exactly three floating-point
  516.     numbers on this line.  Default is white.  (1.0 1.0 1.0)
  517.  
  518.     Silhouette:
  519.     Doesn't work.  What's more, this will cause a performance
  520.     degradation.  Default is OFF.
  521.  
  522.     SW Offset:
  523.     Specifies the offset to use for software edges.  The default
  524.     value is 0.1, which is optimal for most cases, but may be
  525.     wrong if the Z range is changed.
  526.  
  527.  
  528. Nurbs
  529.  
  530.     This menu is for setting nurbs properties.
  531.  
  532.     Approx. Method:
  533.     Specifies whether the nurb tessellation is done in world
  534.     coordinates (WC), virtual device coordinates (VDC) or device
  535.     coordinates (DC), and whether to use metric, planar deviation
  536.     or relative spacing.  Default is constant parameter subdivision
  537.     between knots.
  538.  
  539.     Approx Val U:
  540.     Specifies the approximation value to use in the U direction.
  541.  
  542.     Approx Val V:
  543.     Specifies the approximation value to use in the V direction.
  544.  
  545.     Param Style:
  546.     Iso Curves shows the curves defining the surface.  Note that
  547.     this may not have a proper Z offset and is not likely to
  548.     look as good as the edges.
  549.  
  550.     Show Tessellation draws edges around each generated triangle.
  551.     Edges must be enabled in the edge menu before enabling this
  552.     function.
  553.  
  554.     Increase Silhouette Tessellation causes a finer tessellation
  555.     for parts of the object containing a silhouette edge.
  556.  
  557.     Iso Curve Placement:
  558.     Specifies whether Iso curves are placed between knots or
  559.     between limits.
  560.  
  561.     # Iso Curves U:
  562.     Number of Iso curves in the U direction.
  563.  
  564.     # Iso Curves V:
  565.     Number of Iso curves in the V direction.
  566.  
  567.  
  568. Picking
  569.  
  570.     Specifies picking modes and controls.  When picking is enabled,
  571.     the mouse may be used to select a part or facet depending on
  572.     the picking mode.  Use the select button to select a single
  573.     part.  Use the adjust button to get multiple parts (as in
  574.     standard OpenLook).  The first part selected (if there are more
  575.     than one) also becomes the current part (see Part Selection to
  576.     determine "first part").
  577.  
  578.     When picking is set to By Facet, clicking on a single facet will
  579.     change it to the facet highlight color.  This is currently
  580.     useful with the Edit menu.
  581.  
  582.     Picking:
  583.     Picking is available either per part or
  584.     per facet.  Default is off.  Note that
  585.     cursor motion is not available while
  586.     picking is enabled.
  587.  
  588.     Pick Aperture:
  589.     The pick aperture specifies how many
  590.     pixels in all directions from the center
  591.     of the cursor qualify to be picked.
  592.  
  593.     Part Highlight Color:
  594.     Specifies the color used in highlighting
  595.     the part(s) picked.  Highlight color may
  596.     be set to any desired value.
  597.  
  598.     Facet Highlight Color:
  599.     Specifies the color used in highlighting
  600.     the facet(s) picked.
  601.  
  602.     If multiple parts or facets fall within the pick aperture
  603.     all will be selected.
  604.  
  605.     When picking is disabled, the cursor rotates the
  606.     object with the select button or changes the size
  607.     (scales) with the adjust button.
  608.  
  609.  
  610. Lighting
  611.  
  612.     This menu is for setting lighting parameters.  Up to 32 lights
  613.     may be specified.  All lights have different default settings,
  614.     with the first three enabled by default.  Light 0 is ambient and
  615.     lights 1 and 2 are directional.  Light 3 is a spot light and
  616.     light 4 is positional.  All the rest are directional with
  617.     varying colors and directions.
  618.  
  619.     Light #:
  620.     The number in this field (between 0 and 31, inclusive)
  621.     corresponds to the light that you are currently working on
  622.     (and whose attributes are currently displayed).  To change
  623.     the attributes for a specific light, just enter the light
  624.     number in this field (or use the arrow keys).
  625.  
  626.     Switch:
  627.     This determines whether the current light is on or off.
  628.     Default is OFF.
  629.  
  630.     Type:
  631.     Determines what sort of light the current light is.  Choices
  632.     are:  Ambient, Directional, Positional, or Spot.  Each sort
  633.     of light has specific attributes which should be set (mentioned
  634.     in the following text).
  635.  
  636.     Color:
  637.     This specifies the color of the light, specified by exactly
  638.     three floats (R, G, B).
  639.  
  640.     Direction:
  641.     Determines what direction the light is pointing.  There must be
  642.     three floats, and this attribute is relevant only to
  643.     Directional and Spot lights.
  644.  
  645.     Position:
  646.     Determines position of the light source.  Again, there must be
  647.     exactly three floating-point numbers on this line.  Valid only
  648.     for Positional and Spot lights.
  649.  
  650.     Atten1 & Atten2:
  651.     Specifies the light attenuation coefficients.  Valid only for
  652.     Positional and Spot lights.  See the XGL manual if you want
  653.     to understand how these work.  Atten2 causes brightness to
  654.     drop with distance.
  655.  
  656.     Angle:
  657.     Specifies the spot light angle, in radians, at which, the
  658.     light is cut off completely.  This interacts closely with
  659.     the spot exponent.  Valid for Spot lights only.  If the
  660.     angle is small relative to the spread specified by the
  661.     exponent, expect to see rendering artifacts at the edges of
  662.     the spot light.
  663.  
  664.     Exponent:
  665.     The spot light concentration exponent.  Specifies how fast the
  666.     intensity falls off as the distance increases.  A value of 1.0
  667.     doesn't drop off much at all, a large value drops off very
  668.     quickly forming a narrow beam.  Valid only for Spot lights.
  669.  
  670.  
  671. Depth Cue
  672.  
  673.     This menu sets depth cuing parameters.
  674.  
  675.     Mode:
  676.     Specifies whether depth cuing is linear, scaled or none.
  677.     Use scaled for best effect.  Default is None.
  678.  
  679.     Color:
  680.     Determines depth cue color.  Default is black (0.0 0.0 0.0) but
  681.     should be the background color.
  682.  
  683.     Front Ref. Plane:
  684.     Specifies the position of the front reference plane.  The
  685.     front reference plane is constrained to always be greater
  686.     than the back reference plane.  Default is 0.2.
  687.  
  688.     Back Ref. Plane:
  689.     Specifies the position of the back reference plane.  The
  690.     back reference plane is constrained to always be less
  691.     than the front reference plane.  Default is -0.2.
  692.  
  693.     Max. Scale:
  694.     Specifies the ratio of object color to depth-cue color at
  695.     the front reference plane.  Default is 1.0.
  696.  
  697.     Min. Scale:
  698.     Specifies the ratio of object color to depth-cue color
  699.     at the back reference plane.  Default is 0.1.
  700.  
  701.     Use BG Color
  702.     Determines whether to use the color specified in the second
  703.     field or to depth-cue to the background color.
  704.  
  705.  
  706. Texture Mapping
  707.  
  708.     This menu sets texture mapping paramters.
  709.  
  710.     Texture On/Off:
  711.     Turns texture mapping on or off.  To view a textured object,
  712.     a texture map must be previously loaded using the
  713.     "Load Texture" option of the File menu.
  714.  
  715.     Binding:
  716.     Performs automatic binding of texture coordinates to the
  717.     vertices of an object.  Must be performed if original
  718.     vertices don't contain data values.
  719.  
  720.     Texture Method:
  721.         Either vertex-level, or standard pixel texture mapping.
  722.     
  723.     Approx Type:
  724.         Used for vertex-level texture mapping only.  Num Segments
  725.         specifies into how many segments to subdivide each triangle
  726.         side.  Pixel Tolerance specifies allowable subtriangle size
  727.         in pixels.  Combined mode selects the smallest subdivision
  728.         from the first two types.
  729.     
  730.     Subsegments:
  731.     Used for vertex-level texture mapping only.
  732.     Number of subsegments for Num Segments approximation type.
  733.  
  734.     Pixel Tolerance:
  735.     Used for vertex-level texture mapping only.
  736.         Subtriangle size in pixels for Pixel Tolerance approximation type.
  737.  
  738.  
  739. Model Clipping
  740.  
  741.     Up to 16 model clipping planes may be specified.
  742.  
  743.     # of Clip Planes:
  744.     Specifies how many model clip planes are enabled.
  745.     Default is 0.
  746.  
  747.     Coords:
  748.     For each model clipping plane a 3D coordinate specifies a
  749.     point on the plane.
  750.  
  751.     Normals:
  752.     Specifies a normal to the plane in the direction of the part
  753.     of the model not to clip away.
  754.  
  755.     Note that the default values for each plane is unique such that
  756.     adding a plane is visible with most objects.
  757.  
  758.  
  759. Annotation
  760.  
  761.     This menu may be used to determine how annotation text is rendered
  762.     for an object.  Annotation names are determined by part names in
  763.     the data file.
  764.  
  765.     Show Annotation:
  766.     Whether the object is annotated or not.  Default is OFF.
  767.  
  768.     Antialiasing:
  769.     For no antialiasing (jaggy lines) turn this off.  For lines all
  770.     by themselves, the best setting is to blend to constant
  771.     background.  For lines mixed with solids, the best setting is
  772.     to blend to arbitrary background.  Default is OFF.
  773.  
  774.     Char(acter) Height:
  775.     Determines how tall the annotation text is.  Default is 0.05.
  776.  
  777.     Slant Angle:
  778.     Determines the slope of the annotation characters.  Default is
  779.     straight up (0.0).
  780.  
  781.     Up Vector:
  782.     Default is (0.0 1.0).
  783.  
  784.     Color:
  785.     Determines what color the text will be rendered.  Default is
  786.     green.  (0.0 1.0 0.0)
  787.  
  788.     Style:
  789.     The Line option will cause annotation lines to be drawn from
  790.     the text to the part which it is pointing to.  Normal mode will
  791.     not render those lines.  Default is Line.
  792.  
  793.     Pointer Length:
  794.     This determines how far the text will be from the annotated
  795.     part.  Default is 1.0.
  796.  
  797.     Horizontal Alignment:
  798.     Specifies how text is lined up horizontally.  Choices are:
  799.     Normal, Right, Left, and Center.  Default is Normal.
  800.  
  801.     Vertical Alignment:
  802.     Specifies how text lines up vertically.  Choices are: Normal,
  803.     Base, Bottom, Top, Half, and Cap.  Default is Normal.
  804.  
  805.     Text Path:
  806.     Determines which direction the text continues from its starting
  807.     point.  Choices are Right, Left, Up, and Down.  Default is
  808.     Right.
  809.  
  810.  
  811. Text
  812.  
  813.     Text is not implemented in the current code (V2.3.1).
  814.  
  815.  
  816. Global Settings
  817.  
  818.     This menu specifies global settings that don't fit well into
  819.     other categories.  Most may only be set once per frame
  820.     displayed.
  821.  
  822.     Background Color:
  823.     Sets the background color for the display window.  Enter
  824.     three floating-point numbers on this line.  Default color
  825.     is black.  (0.0 0.0 0.0)
  826.  
  827.     Deferral Mode:
  828.     Determines when things are drawn: As Soon As Possible (ASAP)
  829.     or At Some TIme (ASTI).  ASAP is slower for most
  830.     accelerators.  Default is ASTI.
  831.  
  832.     Double Buffered:
  833.     Specifies whether drawing will be done in single or
  834.     double buffered mode.  The default setting for this
  835.     attribute depends on whether or not double-buffering is
  836.     available on the device.
  837.  
  838.     Stereo Mode:
  839.     Allows the user to select stereo mode.  The object gets
  840.     drawn twice into the same buffer if stereo is not
  841.     available.  The default depends on the current mode of
  842.     the window system.  If the display is running in stereo
  843.     mode, this attribute will be enabled.
  844.  
  845.     Someday this will be smart enough to detect that there is
  846.     no stereo mode and will use the cheap red/blue mode.
  847.  
  848.     Reset all attributes
  849.     Pressing this button resets all of the global attribute
  850.     settings.  This currently does not update the per-part
  851.     attributes.
  852.  
  853.  
  854. Motion
  855.  
  856.     This menu is for setting motion/transformation parameters.
  857.  
  858.     Reset All:
  859.     Resets the local and global matrices to identity.  This does
  860.     not stop motion or reset any motion values.  Especially
  861.     useful when the object has accidentally been translated off
  862.     the screen and lost.
  863.  
  864.     Stop:
  865.     Stop all motion.
  866.  
  867.     Start:
  868.     Begin motion for the specified number of frames.  Stop after
  869.     that many frames.
  870.  
  871.     # of Frames:
  872.     Specifies how many frames to display after pressing the start
  873.     button.  Most useful for slow hardware or very large models.
  874.  
  875.     Global XYZ-Axis:
  876.     Specifies the angle of rotation (in degrees) for each axis of
  877.     the global modeling matrix.  Affected by the left (select)
  878.     mouse button.
  879.  
  880.     Global Scale:
  881.     Applies a scale to the object, using the global matrix.
  882.     Affected by the middle (adjust) mouse button.
  883.  
  884.     Global Free Run:
  885.     Specifies to draw continuously, updating the global matrix each
  886.     frame.
  887.  
  888.     Global Stop
  889.     Stops updates to the global matrix.  If the local matrix is not
  890.     in free run mode, this also stops all automatic motion.
  891.  
  892.     Reset Global Matrix
  893.     Resets the global matrix to identity.
  894.  
  895.     Local XYZ-Axis:
  896.     Specifies the angle of rotation (in degrees) for each axis of
  897.     the local modeling matrix.
  898.  
  899.     Local Free Run:
  900.     Specifies to draw continuously, updating the local matrix each
  901.     frame.
  902.  
  903.     Local Stop
  904.     Stops updates to the local matrix.  If the global matrix is not
  905.     in free run mode, this also stops all automatic motion.
  906.  
  907.     Reset Local Matrix
  908.     Resets the local matrix to identity.
  909.  
  910.     Both local and global motion is available so that more complex
  911.     motion can be easily specified.
  912.  
  913.     Note that moving the object using the mouse select button
  914.     sets the X and Y local axis values and clears the Z axis value.
  915.     Scaling using the mouse adjust button modifies the local scale
  916.     setting.
  917.  
  918.  
  919. View
  920.  
  921. This menu specifies how an object is viewed.
  922.  
  923.     Center XYZ:
  924.     These sliders allow the object center to be moved to get
  925.     either a more natural appearance or to purposely set the object
  926.     off center.
  927.  
  928.     Object Center:
  929.     Specifies how to center the object.  To use the slider select
  930.     Use Slider.  To set the center to one of the 6 boundaries
  931.     select plus or minus XYZ.  Minus Y would put a car on its
  932.     wheels, for example.
  933.  
  934.     Object Scale:
  935.     Allows a choice of making the object exactly fit within the
  936.     window (at the narrowest dimension) or to be half that size or
  937.     to use its original size.  Window bounds are -1.0 to 1.0.
  938.  
  939.     Object View Scale:
  940.     Allows the overall image to be scaled without affecting
  941.     perspective or other view parameters.
  942.  
  943.     Z-clip Scale:
  944.     Specifies how the object is scaled in Z to avoid being
  945.     clipped.  This also affects the Z-buffer precision.
  946.  
  947.     Perspective:
  948.     Adjusts the perspective value.
  949.  
  950.  
  951. Environment Settings
  952.  
  953.     Controls additional environment objects.
  954.  
  955.     Floor:
  956.     To get a floor at the bottom of the object, enable one of these
  957.     3 settings.  A solid fine grid is best for spot lights.  A
  958.     solid single square is best for other solid floors.
  959.  
  960.     Floor Color:
  961.     Specifies what color the floor is.
  962.  
  963.     Floor Prim. Type:
  964.     Specifies Solid or Wireframe.  Wireframe floors have less
  965.     overhead than solid, but don't look as good with shadows.
  966.  
  967.     Floor Position:
  968.     Specify the position of the floor relative to the object.  A
  969.     value of 0.0 will touch the bottom of the object.  You can
  970.     slide it up for boats and such.
  971.  
  972.     "Shadow":
  973.     Causes a fake shadow to be drawn.  This is accomplished by
  974.     drawing the entire object again in the shadow color and scaling
  975.     by 0.0 in Y to squash everything into one plane.  This is NOT a
  976.     correct shadow, but looks good with overhead lighting.  The
  977.     shadow is only available when a floor is drawn.
  978.  
  979.     Shadow Darkness:
  980.     Specifies the percentage of floor color to use in drawing the
  981.     shadow.
  982.  
  983.  
  984. Raster Settings
  985.  
  986.     Controls how raster images are viewed.
  987.  
  988.     Left Offset
  989.  
  990.     This slider adds an offset to the left side of the image.
  991.     It specifies to skip pixels to the left of the image.
  992.  
  993.     Top Offset
  994.  
  995.     This slider adds an offset to the top of the image.  It
  996.     specifies to skip pixels at the top of the image.
  997.  
  998.     Width
  999.  
  1000.     Specifies how much of the image to view in the horizontal
  1001.     direction.
  1002.  
  1003.     Height
  1004.  
  1005.     Specifies how much of the image to view in the vertical
  1006.     direction.
  1007.  
  1008.     Switch To Raster
  1009.  
  1010.     The default mode is Off, which means to draw the object in
  1011.     3D mode.  Save Pixels means to take the current image being
  1012.     to displayed and store it as a raster image.  Further
  1013.     manipulations are now done in raster mode.  Stochastic
  1014.     Sample causes the image to be sampled 8 times with a
  1015.     sub-pixel jittered offset.  If the object is in motion at
  1016.     the time you will also get motion blur.
  1017.  
  1018.     Reset Image Position
  1019.  
  1020.     Use this to get the image back in the upper left corner when
  1021.     you have accidentally slid it off the screen and can't find
  1022.     it again.
  1023.  
  1024.  
  1025. Demo
  1026.  
  1027.     This special menu has 6 simple controls that are supposed to do
  1028.     the "right thing" without concern for interaction with other
  1029.     controls.  All of these will update the appropriate other menus
  1030.     that they affect.
  1031.  
  1032.     Solid/Wireframe
  1033.  
  1034.     Switches between solid and wireframe mode.
  1035.  
  1036.     Line Antialiasing
  1037.  
  1038.     Turns line antialiasing on and off.
  1039.  
  1040.     Edges
  1041.  
  1042.     Turns edges (including nurb tessellation) on and off.
  1043.  
  1044.     Transparency
  1045.  
  1046.     Switches between the two transparency modes and solid
  1047.     rendering.
  1048.  
  1049.     Depth-cue
  1050.  
  1051.     Turns depth-cue on and off.
  1052.  
  1053.     Model Clipping
  1054.  
  1055.     Turns model clipping on and off.
  1056.  
  1057.  
  1058.  
  1059. FILE MENU
  1060.  
  1061. The File menu allows the user to load models to be viewed.  It also
  1062. allows models (and attributes), objects and raster images to be
  1063. saved to be reloaded later.
  1064.  
  1065. Each of the general load and save control panels display a scrollable
  1066. list of potential files or directories to choose from.  Double-clicking
  1067. on the desired file loads that file.  Double-clicking on a directory
  1068. changes to that directory.
  1069.  
  1070. The File controls are as follows:
  1071.  
  1072.     Load Model
  1073.  
  1074.     Loads in a model script (.mdl).  This contains commands to
  1075.     set all attributes as well as to specify the object to be
  1076.     loaded.  It may contain motion directives as well.  Details
  1077.     of what may go in one of these scripts are found below.
  1078.  
  1079.     Load Object
  1080.  
  1081.     Load an object from one of the currently supported object file
  1082.     formats.  Wavefront objects are found in files with the .obj
  1083.     extension.  DEC Object File Format objects are found in files
  1084.     with the .off extension.  Sun Shader files may also be loaded
  1085.     (.shad extension).  PTC ProEngineer objects are stored in files
  1086.     with the .slp extension.  Nurb files have a .nu or .sof
  1087.     extension.  Sun Raster files may also be loaded if they have
  1088.     one of the following extension: .im32, .im24, .im8 or .ras.
  1089.     Note that all attributes get reset whenever an object is
  1090.     loaded.
  1091.  
  1092.     Load Texture
  1093.  
  1094.     Loads in a raster file, describing a texture map.
  1095.  
  1096.     Save Model
  1097.  
  1098.     Save the current attribute settings and model specification.
  1099.     This is supposed to save everything so that the exact same
  1100.     image will be seen when reloaded.  It is not 100% perfect,
  1101.     but it does work most of the time.
  1102.  
  1103.     Save Object
  1104.  
  1105.     Save the current 3D model in Wavefront format.  Doesn't work
  1106.     with all models, especially nurbs.
  1107.  
  1108.     Save Raster
  1109.  
  1110.     Save the current screen image as a 24-bit Sun Rasterfile.
  1111.     This also switches to raster mode if not already in that
  1112.     mode.
  1113.  
  1114.     Load Color Cube
  1115.  
  1116.     Loads a simple cube, identical to that used at when the
  1117.     program is first started.
  1118.  
  1119.  
  1120.  
  1121. PROPS MENU
  1122.  
  1123. The properties menu currently contains four buttons.  Performance data
  1124. specifies how many of each type of primitive are being displayed, and
  1125. how fast this data is being displayed.  Edit contains an incomplete
  1126. edit menu that is still under construction (V2.0).  Help contains a
  1127. brief overview of how to use LAVA.  About contains information about
  1128. the program authors.
  1129.  
  1130. The fields in the Performance Data panel are as follows:
  1131.  
  1132.     Triangles:
  1133.  
  1134.     The number of triangles being displayed.  When this field
  1135.     has a number and the Lines and Points fields are zero, the
  1136.     primitives per second field is the triangles per second
  1137.     number.
  1138.  
  1139.     Lines:
  1140.  
  1141.     The number of lines being displayed.  When this field has a
  1142.     number and the Triangles and Points fields are zero, the
  1143.     primitives per second field is the lines per second number.
  1144.     Note that the typical polyline length is very short, with
  1145.     the maximum length no longer than the number of lines it
  1146.     takes to go around the edges of a facet without drawing an
  1147.     edge that already belongs to a neighboring facet.
  1148.  
  1149.     Points:
  1150.  
  1151.     The number of points being displayed.  When this field has a
  1152.     number and the Triangles and Lines fields are zero, the
  1153.     primitives per second field is the points per second number.
  1154.     If the marker type is other than Dot, this number may not
  1155.     have a lot of meaning.
  1156.  
  1157.     Frames/sec:
  1158.  
  1159.     How many times the picture is redrawn per second.  The
  1160.     program waits until the time specified by the Sample Rate
  1161.     has been exceeded, then divides the number of frames by the
  1162.     time that has elapsed.  High performance accelerators should
  1163.     be able to draw simple objects at the monitor refresh rate.
  1164.  
  1165.     Primitives/sec:
  1166.  
  1167.     How many primitives per second are being drawn.  Primitives
  1168.     are the sum of the Triangles, Lines and Points.  Two of
  1169.     these three fields should be zero to get a valid performance
  1170.     number for a given primitive type.  Note that this number
  1171.     will go up if you switch from double to single buffered mode
  1172.     because the system will no longer wait to synchronize with
  1173.     vertical retrace (but the screen repaint will not appear
  1174.     smooth).
  1175.  
  1176.     Parts:
  1177.  
  1178.     Specifies how many separate parts the object contains.  Each
  1179.     individual part may have separate attributes.  An object
  1180.     with more parts has more overhead in the display loop than
  1181.     an object with fewer parts.  Otherwise, this number has no
  1182.     direct impact on the primitives per second number.
  1183.  
  1184.     Facets:
  1185.  
  1186.     How many facets are being displayed.  The current version of
  1187.     code (V2.0) turns each facet into a triangle strip with a
  1188.     restart at the beginning.  No attempt is made to chain these
  1189.     together into longer strips.  This number has no direct
  1190.     impact on the primitives per second number and is only
  1191.     present to provide just a little more information about the
  1192.     model.
  1193.  
  1194.     Sample rate (sec):
  1195.  
  1196.     How often the frames per second and primitives per second
  1197.     fields are updated.  Because of the overhead of updating the
  1198.     panel, the longer you wait, the more accurate the numbers
  1199.     will be.  The default value is 2 seconds, which is a good
  1200.     compromise between the overhead of updating the panel and
  1201.     the attention span of the average viewer.  This field may be
  1202.     set by the user.
  1203.  
  1204.  
  1205.  
  1206. COMMAND SCRIPTS
  1207.  
  1208. Nearly all attributes that may be set in the Controls menu may also
  1209. be set in a command script.  Command scripts are contained in model
  1210. files (.mdl).  The command lines must contain a single command per
  1211. line, although extra whitespace is allowed anywhere.  Commands that
  1212. require more than one line must have a backslash character (\) as
  1213. the last character of the line.  Comments use the exclamation point
  1214. character (!) and last to the end of the current line.  In general,
  1215. everything after a valid command on a line is ignored.
  1216.  
  1217. A command script may be loaded using the Load Model button on the File
  1218. menu or the program may be started up under control of a command file
  1219. as follows:
  1220.  
  1221.     lava -file test_file.mdl
  1222.  
  1223. Note that all but part names are totally case insensitive.  Part
  1224. names MUST match upper and lower case.
  1225.  
  1226. The easiest way to get started on creating a .mdl file is to load
  1227. the desired object, set the attributes you want, then save it
  1228. using the Save Model command.  Then just edit the results until
  1229. the desired effect is achieved.
  1230.  
  1231. In general, any numeric value following an equals sign (=) may also
  1232. be followed by an operator-equals sign (+=, -=, *=, or /=).  This
  1233. allows loops to be created where values such as color or line widths
  1234. can change as each image is rendered.
  1235.  
  1236. The following list contains all of the currently supported commands,
  1237. in an order matching the control menu.  Any item that allows a choice
  1238. of several values will have all choices listed in a pair of square
  1239. brackets (e.g. [off on]).  In the command script, exactly one of these
  1240. choices must be used (and without the brackets).  Floating-point and
  1241. integer values are specified in these examples as <float> and <int>
  1242. respectively.  The numbers in the file may use any format that is
  1243. acceptable to a standard C compiler.  Part names may optionally be
  1244. encased in double quotes, which are required if the part name has a
  1245. space character in it.
  1246.  
  1247. The following groups of attributes may be set on a global basis
  1248. or on a per-part basis.  To set either the global value or the
  1249. part value of render.prim_type to solid, any of the following five
  1250. formats are acceptable:
  1251.  
  1252.     render.prim_type = solid        ! Sets global primitive type to solid
  1253.     render.prim_type Global = solid    ! Sets global primitive type to solid
  1254.     render.prim_type "Global" = solid    ! Sets global primitive type to solid
  1255.     render.prim_type part_1 = solid    ! Sets part_1 to solid
  1256.     render.prim_type "part_1" = solid    ! Sets part_1 to solid
  1257.                     ! <= This is a comment, remember?
  1258.  
  1259. Note once again that part names are case sensitive and may
  1260. include spaces in some instances.
  1261.  
  1262. Attribute commands to turn parts off and on:
  1263.  
  1264.     part.select <part name>
  1265.     part.deselect <part name>
  1266.     part.select_all
  1267.     part.deselect_all
  1268.  
  1269. Attribute setting commands which may optionally be applied per
  1270. part:
  1271.  
  1272.     render.prim_type = [wireframe markers solid]
  1273.     render.face_culling = [off back front]
  1274.     render.face_dist = [off on]
  1275.     render.raster_op = [clear set copy copy_inv invert and and_reverse \
  1276.         and_inv nand or or_reverse or_inv nor xor equiv noop]
  1277.     render.hlhsr_mode = [off on]
  1278.  
  1279.     markers.marker_type = [dot plus asterisk circle cross square \
  1280.         bowtie_ne bowtie_nw]
  1281.     markers.marker_color = <float> <float> <float>
  1282.     markers.antialiasing = [off constant_bg arbitrary_bg]
  1283.     markers.scale_factor = <float>
  1284.     markers.color_selector = [context vertex]
  1285.  
  1286.     lines.line_color = <float> <float> <float>
  1287.     lines.antialiasing = [off constant_bg arbitrary_bg]
  1288.     lines.line_width = <float>
  1289.     lines.endpoint_style = [butt square round]
  1290.     lines.join_style = [device bevel miter]
  1291.     lines.miter_limit = <float>
  1292.     lines.line_style = [solid patterned alt_patterned]
  1293.     lines.line_pattern = [ dotted dashed dashed_dotted cgm_dotted \
  1294.         cgm_dashed dash_dot dash_dot_dotted long_dashed]
  1295.     lines.alt_line_color = <float> <float> <float>
  1296.     lines.color_selector = [context vertex]
  1297.     lines.color_interp = [off on]
  1298.  
  1299.     front_surf.color = <float> <float> <float>
  1300.     front_surf.fill_style = [solid hollow empty opaque_stipple stipple pattern]
  1301.     front_surf.stipple_pattern = [horizontal vertical diag_45 diag_135 \
  1302.         grid_r grid_d horiz_dbl vert_dbl diag_45_dbl diag_135_dbl \
  1303.         grid_r_dbl grid_d_dbl]
  1304.     front_surf.color_selector = [context facet illum_dep illum_indep]
  1305.     front_surf.illum = [none interp_color per_facet per_vertex]
  1306.     ! Note: Zero or more of the following three are allowed */
  1307.     front_surf.light_component = ambient diffuse specular
  1308.     front_surf.ambient = <float>
  1309.     front_surf.diffuse = <float>
  1310.     front_surf.specular = <float>
  1311.     front_surf.specular_color = <float> <float> <float>
  1312.     front_surf.specular_power = <float>
  1313.     front_surf.transp_method = [none screen_door blended]
  1314.     front_surf.transp_blend_eq = [none arbitrary_bg constant_bg add_to_bg]
  1315.     front_surf.transparency = <float>
  1316.  
  1317.     back_surf.color = <float> <float> <float>
  1318.     back_surf.fill_style = [solid hollow empty opaque_stipple stipple pattern]
  1319.     back_surf.stipple_pattern = [horizontal vertical diag_45 diag_135 \
  1320.         grid_r grid_d horiz_dbl vert_dbl diag_45_dbl diag_135_dbl \
  1321.         grid_r_dbl grid_d_dbl]
  1322.     back_surf.color_selector = [context facet illum_dep illum_indep]
  1323.     back_surf.illum = [none interp_color per_facet per_vertex]
  1324.     ! Note: Zero or more of the following three are allowed */
  1325.     back_surf.light_component = ambient diffuse specular
  1326.     back_surf.ambient = <float>
  1327.     back_surf.diffuse = <float>
  1328.     back_surf.specular = <float>
  1329.     back_surf.specular_color = <float> <float> <float>
  1330.     back_surf.specular_power = <float>
  1331.  
  1332.     edges.show_edges = [off on]
  1333.     edges.edge_color = <float> <float> <float>
  1334.     edges.antialiasing = [off constant_bg arbitrary_bg]
  1335.     edges.edge_width = <float>
  1336.     edges.edge_style = [solid patterned alt_patterned]
  1337.     edges.edge_pattern = [ dotted dashed dashed_dotted cgm_dotted \
  1338.         cgm_dashed dash_dot dash_dot_dotted long_dashed]
  1339.     edges.alt_edge_color = <float> <float> <float>
  1340.     edges.silhouette = [off on]
  1341.  
  1342.     nurbs.approx_method = [const_param_subdiv_between_knots metric_wc \
  1343.         metric_vdc metric_dc chordal_deviation_wc \
  1344.         chordal_deviation_vdc chordal_deviation_dc \
  1345.         relative_wc relative_vdc relative_dc]
  1346.     nurbs.approx_val_u = <float>
  1347.     nurbs.approx_val_v = <float>
  1348.     ! Note: Zero or more of the following three are allowed */
  1349.     nurbs.param_style = iso_curves show_tess incr_silh_tess
  1350.     nurbs.iso_curve_placement = [between_knots between_limits]
  1351.     nurbs.iso_curves_u = <int>
  1352.     nurbs.iso_curves_v = <int>
  1353.  
  1354.  
  1355. The following commands only apply on a global basis and may not
  1356. have a part name keyword applied:
  1357.  
  1358.     picking.picking = [off on]
  1359.     picking.part_highlight_color = <float> <float> <float>
  1360.     picking.facet_highlight_color = <float> <float> <float>
  1361.     picking.pick_aperture = <int>
  1362.  
  1363.     ! Note: To specify light number 4, use "[4]" before the equals sign
  1364.     lighting.switch [0] = [off on]
  1365.     lighting.type [0] = [ambient directional positional spot]
  1366.     lighting.color [0] = <float> <float> <float>
  1367.     lighting.direction [0] = <float> <float> <float>
  1368.     lighting.position [0] = <float> <float> <float>
  1369.     lighting.atten_1 [0] = <float>
  1370.     lighting.atten_2 [0] = <float>
  1371.     lighting.angle [0] = <float>
  1372.     lighting.exponent [0] = <float>
  1373.  
  1374.     depth_cue.mode = [none linear scaled]
  1375.     depth_cue.color = <float> <float> <float>
  1376.     depth_cue.front_ref_plane = <float>
  1377.     depth_cue.back_ref_plane = <float>
  1378.     depth_cue.max_scale = <float>
  1379.     depth_cue.min_scale = <float>
  1380.     
  1381.     texture.switch = [off image video]
  1382.     texture.binding  ! performs texture binding
  1383.     texture.approx = [num_seg pixel_tol combined]
  1384.     texture.subseg = <int>
  1385.     texture.pixel_tol = <int>
  1386.     texture.tau_func = <int>
  1387.     texture.update   ! updates all texture parameters.  Needed before draw
  1388.  
  1389.     model_clipping.num_planes = <int>
  1390.     !Note: To specify clip plane 3, use "[3]" before the equals sign
  1391.     model_clipping.coord [0] = <float> <float> <float>
  1392.     model_clipping.normal [0] = <float> <float> <float>
  1393.  
  1394.     annotation.show = [off on]
  1395.     annotation.antialiasing = [off constant_bg arbitrary_bg]
  1396.     annotation.char_height = <float>
  1397.     annotation.slant_angle = <float>
  1398.     annotation.up_vector = <float> <float>
  1399.     annotation.color = <float> <float> <float>
  1400.     annotation.style = [normal line]
  1401.     annotation.pointer_length = <float>
  1402.     annotation.horiz_alignment = [normal right left center]
  1403.     annotation.vert_alignment = [normal base bottom top half cap]
  1404.     annotation.text_path = [right left up down]
  1405.  
  1406.     global.background_color = <float> <float> <float>
  1407.     global.deferral_mode = [asti asap]
  1408.     global.double_buffered = [off on]
  1409.     global.stereo_mode = [off on]
  1410.     global.reset_attr        ! This is like pressing the button
  1411.  
  1412.     motion.reset_transforms    ! These are like pressing the button
  1413.     motion.stop
  1414.     motion.start
  1415.     motion.num_frames = <int>
  1416.     motion.global_x_rotate = <float>    ! Note that rotations don't
  1417.     motion.global_y_rotate = <float>    ! allow the op-equals format
  1418.     motion.global_z_rotate = <float>
  1419.     motion.global_scale = <float>
  1420.     motion.global_free_run
  1421.     motion.global_stop
  1422.     motion.local_x_rotate = <float>    ! Note that rotations don't
  1423.     motion.local_y_rotate = <float>    ! allow the op-equals format
  1424.     motion.local_z_rotate = <float>
  1425.     motion.local_free_run
  1426.     motion.local_stop
  1427.  
  1428.     view.center_x = <float>
  1429.     view.center_y = <float>
  1430.     view.center_z = <float>
  1431.     view.object_center = [use_slider plus_x minus_x plus_y minus_y plus_z \
  1432.         minus_z none]
  1433.     view.object_scale = [half_screen full_screen original]
  1434.     view.view_scale = <float>
  1435.     view.z_clip_scale = <float>
  1436.     view.perspective = <float>
  1437.  
  1438.     env.floor = [none single_square coarse_grid fine_grid]
  1439.     env.floor_color = <float> <float> <float>
  1440.     env.floor_prim_type = [solid wireframe]
  1441.     env.floor_position = <float>
  1442.     env.shadow = [off on]
  1443.     env.shadow_darkness = <float>
  1444.  
  1445.  
  1446. Additional motion control commands:
  1447.  
  1448.     position.reset_transforms
  1449.  
  1450.     ! Reset the local and global position transformation matrices.
  1451.  
  1452.     position.local_scale = <float>
  1453.     position.local_x_translate = <float>
  1454.     position.local_y_translate = <float>
  1455.     position.local_z_translate = <float>
  1456.     position.local_x_rotate = <float>
  1457.     position.local_y_rotate = <float>
  1458.     position.local_z_rotate = <float>
  1459.  
  1460.     position.global_scale = <float>
  1461.     position.global_x_translate = <float>
  1462.     position.global_y_translate = <float>
  1463.     position.global_z_translate = <float>
  1464.     position.global_x_rotate = <float>
  1465.     position.global_y_rotate = <float>
  1466.     position.global_z_rotate
  1467.  
  1468. A special case exists for matrices:
  1469.  
  1470.     position.local_matrix = <16 floats>
  1471.     position.global_matrix = <16 floats>
  1472.     position.view_matrix = <16 floats>
  1473.  
  1474. The matrices are stored when a Model file is saved so that an exact
  1475. view can be restored.  In general, these should be removed from the
  1476. file with a text editor if you want to create a simple model file or
  1477. motion script.  The view matrix is not used directly, even though it
  1478. does represent what is used in the program.  The various numbers are
  1479. extracted and matched to the fields from the view menu.
  1480.  
  1481.  
  1482. Other commands:
  1483.  
  1484.     obj_colors.part_color "part name"= <float> <float> <float>
  1485.  
  1486.     For convenience, this will set the front surface color, line
  1487.     color and marker color for the specified part.  This allows
  1488.     colors to be defined that are retained when changing between
  1489.     solid, wireframe and markers.
  1490.  
  1491.     load_object "object name"
  1492.  
  1493.     The object name can be a full path or the name of a file in the
  1494.     current directory.  The file extension indicates what type of
  1495.     file it is.  Doesn't currently work for other .mdl files.
  1496.     
  1497.     load_texture "texture file"
  1498.  
  1499.         Loads specified texture file.
  1500.  
  1501.     draw
  1502.  
  1503.     Draw the object once.  Useful for motion loops.
  1504.  
  1505.     draw_no_clear
  1506.  
  1507.     Draw but don't clear the screen.  Useful in single-buffered
  1508.     mode to put multiple objects in a scene.
  1509.  
  1510.     no_final_move
  1511.  
  1512.     Sets a flag that prevents a redraw at the end of the .mdl
  1513.     file when something is drawn using draw_no_clear.
  1514.  
  1515.     update_menus
  1516.  
  1517.     For long scripts, this makes sure that any displayed menus
  1518.     are updated at this point instead of waiting until the
  1519.     script is fully complete.
  1520.  
  1521.     loop <int>
  1522.     end_loop
  1523.  
  1524.     The loop/end_loop pair loops through the commands in between
  1525.     the number of times specified by the integer value.  These
  1526.     may be nested up to 10 levels.  It is a good idea to place a
  1527.     "draw" command inside the innermost loop.
  1528.  
  1529.     quit
  1530.  
  1531.     Exit from LAVA.  Generally used by scripts loaded from
  1532.     the command line by test programs that would like the program
  1533.     to exit when the motion is complete.
  1534.  
  1535.     save_image
  1536.  
  1537.     Writes the current image out to a file named "ras.im32" in
  1538.     the current directory.  Especially useful with multipass
  1539.     stochastic sampling (jittering).  This could have a better
  1540.     interface, but was hacked in quickly for V1.2.3.
  1541.  
  1542.     jitter <int>
  1543.     end_jitter
  1544.  
  1545.     Begin a loop using up to 8 internal jitter offsets for
  1546.     multipass stochastic antialising of solid images.  This
  1547.     produces a very nice effect, but the current implementation
  1548.     (V1.2.3) is a bit of a hack.  The other end of the loop must
  1549.     have an end_jitter command, there must be a draw command
  1550.     somewhere inside the loop, and it is a good idea to enable
  1551.     no_final_move if you want to look at the resultant image.
  1552.     This process is currently extremely slow.
  1553.  
  1554.     jitter_offset = <float> <float>
  1555.  
  1556.     Available in case you don't like the predefined jitter
  1557.     values available with the jitter command.  Needs a little
  1558.     more work to be useful.
  1559.     
  1560.  
  1561.  
  1562. EXAMPLE
  1563.  
  1564. The following is a simple motion example showing how a model command
  1565. file might be built:
  1566.  
  1567. !
  1568. ! Make the model move
  1569. !
  1570. ! Best when using the default cube, since it is so simple
  1571. !
  1572.  
  1573. motion.reset_transforms            ! Reset all matrices
  1574. position.reset_transforms
  1575. draw
  1576.  
  1577. render.prim_type = solid        ! Draw a solid object for a while
  1578. loop 3
  1579.     loop 100                ! Move right while rotating
  1580.     position.local_x_translate = 0.002
  1581.     position.local_x_rotate = 1.0
  1582.     draw
  1583.     end_loop
  1584.     loop 100                ! Rotate without moving
  1585.     position.local_x_rotate = 1.0
  1586.     draw
  1587.     end_loop
  1588. end_loop
  1589.  
  1590. position.reset_transforms
  1591. render.prim_type = wireframe        ! Draw wireframe for a while
  1592. lines.line_width = 1
  1593. loop 5
  1594.     loop 40
  1595.     position.global_scale = 0.95    ! Shrink it
  1596.     position.global_x_rotate = 2.0
  1597.     draw
  1598.     end_loop
  1599.     lines.line_width += 1.0        ! Make lines get fatter
  1600.     loop 40
  1601.     position.global_scale = 1.0526    ! Expand it
  1602.     position.global_x_rotate = 2.0
  1603.     draw
  1604.     end_loop
  1605.     lines.line_width += 1.0
  1606. end_loop
  1607.  
  1608. !Done.
  1609.